From 3c77932be456ae67e464fd1b27d21ef9f1eb709a Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 20 Sep 2005 14:09:07 +0000 Subject: [PATCH] Fix xenconsole when console page is >= 4GB. Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c | 5 ++--- linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h | 1 - linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c index 154b0c7354..c93f2bc551 100644 --- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c +++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c @@ -36,13 +36,12 @@ struct ring_head static inline struct ring_head *outring(void) { - return machine_to_virt(xen_start_info->console_mfn << PAGE_SHIFT); + return mfn_to_virt(xen_start_info->console_mfn); } static inline struct ring_head *inring(void) { - return machine_to_virt(xen_start_info->console_mfn << PAGE_SHIFT) - + PAGE_SIZE/2; + return mfn_to_virt(xen_start_info->console_mfn) + PAGE_SIZE/2; } diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h index 788aa0637b..098de998c0 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h @@ -261,7 +261,6 @@ extern int sysctl_legacy_va_layout; /* VIRT <-> MACHINE conversion */ #define virt_to_machine(v) (phys_to_machine(__pa(v))) -#define machine_to_virt(m) (__va(machine_to_phys(m))) #define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h index fd7a675488..242d5b21ac 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h @@ -239,7 +239,6 @@ extern __inline__ int get_order(unsigned long size) /* VIRT <-> MACHINE conversion */ #define virt_to_machine(v) (phys_to_machine(__pa(v))) -#define machine_to_virt(m) (__va(machine_to_phys(m))) #define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) -- 2.30.2